package mest.service.cxj.impl;

import mest.VO.cxj.PlanCostOrderRecordVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

import mest.dao.cxj.PlanCostOrderRecordDao;
import mest.entity.PlanCostOrderRecord;
import mest.service.cxj.PlanCostOrderRecordService;

import java.util.List;

@Service
public class PlanCostOrderRecordServiceImpl implements PlanCostOrderRecordService {

    @Resource
    private PlanCostOrderRecordDao planCostorderRecordDao;

    @Override
    public Integer insertPlanCostorderRecord(PlanCostOrderRecord pcor, String theirDb) {
        return planCostorderRecordDao.insertPlanCostorderRecord(pcor, theirDb);
    }

    @Override
    public List<PlanCostOrderRecordVO> selectAllPlanCostOrderRecordById(Integer page, Integer limit, Integer pcId, String theirDb) {
        return planCostorderRecordDao.selectAllPlanCostOrderRecordById((page - 1) * limit, limit, pcId, theirDb);
    }

    @Override
    public Integer selectCountPlanCostOrderRecordById(Integer pcId, String theirDb) {
        return planCostorderRecordDao.selectCountPlanCostOrderRecordById(pcId, theirDb);
    }

}
